Post

Replies

Boosts

Views

Activity

USB microphone with high samplerate and AVAudioEngine
Hello, I can't get my head wrapped around the following problem: I have an external USB microphone capable of samplerates of up to 500 kHz. I want to capture the samples and do analysis and display - no playback required. I can not find a way to run the microphone with its maximum samplerate, I always get 48 kHz. I would like to stick to AVAudioEngine if possible. Any pointer welcome. thx! volker
2
0
786
May ’24
SwiftData document-based app broken
Hello all Synopsis: document based SwiftData app breaks document handling after first save due to internal error saving the -shm file. Long: i am working on a small document based SwiftData app for macOS. The UI works well as long as the document was not saved. After saving the document and reopening it, I get an error consistently in console: BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use: /Users/vrunkel/Library/Containers/de.ecoobs.CurtailmentAnalyzer/Data/tmp/TemporaryItems/NSIRD_CurtailmentAnalyzer_mrXKMs/NewDocument/StoreContent-shm So somehow the -shm file is still referenced to NewDocument created when the app opens an untitled document and resides in the temporary folder. I have saved the document to my documents folder. After reopening and the above error deletion or addition of items crashes the app with a long backtrace to view updating: Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread. I am not creating any threads or do background work. If I do not save the document but work within the new untitled document no problems occur. Even closing the app and reopening the untitled new doc (happens automatically) all is fine. To rule out any influence of my existing view structure I have created the most simple test case - Xcode -> New Project -> macOS document based app configured to use SwiftData. Same behaviour. After saving a new document the addition/deletion of items causes the thread-induced crash and shows the error in console when opening the document. I am using latest versions of Xcode 15.0 and macOS 14.0 Any ideas? thx, volker
7
2
1.7k
Oct ’23
Swift/Collection.swift:722: Fatal error: Index out of bounds
Hello, I have a simple SwiftUI app for macOS. It uses CoreData as data storage. I have a @FetchRequest and use the resulting array to populate a Table. I have added .searchable to have a search field. I usually can search without problems. Yet, some valid search strings result in a crash repeatedly giving: Swift/Collection.swift:722: Fatal error: Index out of bounds The crash happens in the main thread and the call stack is buried within refresh code for the table. It happens after [NSTableView _delegate_isGroupRow:] is called . This is a big show stopper and I have no possibility to interfere since it happens in code out of my control. ´ My table code is without sections and simple like this: var table: some View { Table(selection: $selection, sortOrder: $items.sortDescriptors) { TableColumn("Authors", value: \.authorsForDisplay!).width(min:30, ideal:50, max:200) TableColumn("Title", value: \.title!).width(min:100, ideal:300, max:500) TableColumn("Year", value: \.year) { article in Text(String(article.year)) }.width(min:50, ideal:50, max:50) TableColumn("Journal") { article in Text(article.journal?.name ?? "---") }.width(min:30, ideal:50, max:200) TableColumn("Publisher") { article in Text(article.publishedBy ?? "---") }.width(min:30, ideal:50, max:200) } rows: { ForEach(items) { article in TableRow(article) } }} Any ideas? Thx, Volker
4
0
669
Apr ’23